import BasicLayout from '@/layouts/basic-layout';
import Setting from '@/setting';

const pre = 'activity_';

export default {
  path: `${Setting.roterPre}/activity/`,
  name: 'activity',
  header: 'activity',
  meta: {
    // 授权标识
    auth: ['supplier-activity']
  },
  redirect: {
    name: `${pre}activityList`
  },
  component: BasicLayout,
  children: [
    {
      path: 'index', // 修正为相对路径 → 完整路径：/supplier/customers/index
      name: `${pre}activityList`, // 确保重定向指向这个name
	  meta: {
	    title: '活动列表',
	    auth: ['supplier-activity-index']
	  },
      component: () => import('@/pages/activity/activityList/index') // 路径正确
    },
	{
	    path: 'activityInfo/:id?',
	    name: `${pre}activityInfo`,
	    meta: {
	        auth: ['supplier-activity-info'],
	        title: '活动详情'
	    },
	    component: () => import('@/pages/activity/activityInfo/index')
	},
  ]
};